package ooday05.practise.enums;

public class EnumTest {
    public static void main(String[] args) {
        EnumDemo season=EnumDemo.Winter;
        switch (season){
            case Spring:
                System.out.println("春");
                break;
            case Summer:
                System.out.println("夏");
                break;
            case Autumn:
                System.out.println("秋");
                break;
            case Winter:
                System.out.println("冬");
                break;
        }

        EnumDemo[] seasons = EnumDemo.values();//返回所有枚举对象
        for (EnumDemo season1:seasons){
            System.out.println(season1);
        }
    }
}
